home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 018a / amac41.zip / RFRM31.QM < prev    next >
Text File  |  1991-08-26  |  21KB  |  382 lines

  1. *                               RFRM31.QM
  2. *          Macros to Reformat Blocks, Paragraphs and Documents
  3. *                        Written by Tom Hogshead
  4. *           With Macro Contributions by John Goodman, et al
  5. *                                8/23/91
  6. *  Key    Subfile                            Description
  7. * =====  ==============  ====================================================
  8. * New Macros....
  9. * @(1)   {e:\up\rfr003}--Formats Commented or Uncommented Paragraph,      |new
  10. *                            Leaves: Commented Paragraph Uncommented, or
  11. *                                    Uncommented Paragraph Commented,
  12. *
  13. * @(2)   {e:\up\rfr003}--Formats Commented or Uncommented Paragraph,      |new
  14. *                            Leaves: Paragraph Commenting 'As Is'
  15. *
  16. * @(3)   {e:\up\rfr003}--Formats Commented or Uncommented Paragraph,      |new
  17. *                            Leaves: Commented Paragraph Uncommented, or
  18. *                                    Uncommented Paragraph Commented,
  19. *                            Replaces "period space" with "period two spaces"
  20. *
  21. * @(4)   {e:\up\rfr003}--Formats Commented or Uncommented Paragraph,      |new
  22. *                            Leaves:  Paragraph Commenting 'As Is'
  23. *                            Replaces "period space" with "period two spaces"
  24. *
  25. * @(5)   {e:\up\rfr003}--Removes "period two spaces" From Paragraph       |new
  26. *--
  27. * @(1)   {e:\up\rfr008}--Swap Character at Cursor with NEXT Character     |new
  28. * @(x)   {e:\up\rfr008}--   Alternate version of @1 by John Goodman       |new
  29. * @(7)   {e:\up\rfr008}--   Alternate version of @1 by G. de Bruin        |new
  30. * @(b)   {e:\up\rfr008}--   Slow version of @1 by Mike Konieczny          |new
  31. * @(2)   {e:\up\rfr008}--Swap Two Characters LEFT of Cursor               |new
  32. * @(y)   {e:\up\rfr008}--   Alternate version of @2 by John Goodman       |new
  33. * @(3)   {e:\up\rfr008}--Swap Current Cursor Line with Line BELOW         |new
  34. * @(9)   {e:\up\rfr008}--   Alternate version of @3, Use this instead     |new
  35. * @(4)   {e:\up\rfr008}--Swap Current Cursor Line with Line ABOVE         |new
  36. * @(0)   {e:\up\rfr008}--   Alternate version of @4, Use this instead     |new
  37. * @(5)   {e:\up\rfr008}--Swap Word at Cursor with Word RIGHT of Cursor    |new
  38. * @(e)   {e:\up\rfr008}--   Alternate version of @5                       |new
  39. * @(6)   {e:\up\rfr008}--Swap Word at Cursor with Word LEFT of Cursor     |new
  40. * @(8)   {e:\up\rfr008}--Duplicate Remainder of Previous Line             |new
  41. *                           John Goodman, Author
  42. *--
  43. * @(3)   {e:\up\rfr009}--Convert Vertical to Horizontal Column Block      |new
  44. * @(4)   {e:\up\rfr009}--Convert Horizontal to Vertical Column Block      |new
  45. * @(5)   {e:\up\rfr009}--Convert Vertical to Horizontal Column Block,     |new
  46. *                           Horizontal Entries NOT Separated by Space
  47. * @(6)   {e:\up\rfr009}--Convert Horizontal to Vertical Column Block,     |new
  48. *                           Horizontal Entries NOT Separated by Space
  49. * @(7)   {e:\up\rfr009}--Sort Column Block and Adjacent Text              |new
  50. *                           in DESCENDING Order  (Tim Farley)
  51. * @(9)   {e:\up\rfr009}--Sort Column Block and Adjacent Text              |new
  52. *                           CASE INSENSITIVE
  53. * @(0)   {e:\up\rfr009}--Sort Column Block and Adjacent Text              |new
  54. *                           in REVERSE Order
  55. * @(2)   {e:\up\rfr009}--Sort Column Block in DESCENDING Order,           |new
  56. *                           Adjacent Text Unchanged
  57. * @(8)   {e:\up\rfr009}--Sort Column Block RANDOMLY,                      |new
  58. *                           Adjacent Text Unchanged
  59. *--
  60. * @(4)   {e:\up\rfr005}--Count Words in a Block by John Goodman           |new
  61. * @(0)   {e:\up\rfr005}--Count Words in a File                            |chg
  62. * @(3)   {e:\up\rfr005}--Alternate version of @0 by John Goodman          |new
  63. * @(1)   {e:\up\rfr005}--Count Characters in a Block
  64. * @(2)   {e:\up\rfr005}--Count Characters in a File
  65. *--
  66. * #(f2_) {e:\up\rfr002}--Capitalize First Letter of Word At Cursor        |chg
  67. *--
  68. * @(F8)  {e:\up\rfr001}--Makes All Blank Lines in Document Single Space,
  69. *                       "Lightning Fast!" (Condenses for better readability)
  70. * @(F7)  {e:\up\rfr001}--SINGLE Space Document, "Slow"
  71. * @(g)   {e:\up\rfr001}--SINGLE Space Document, "Lightning Fast!"
  72. * @(F9)  {e:\up\rfr001}--DOUBLE Space Document, "Lightning Fast!"
  73. * @(F0)  {e:\up\rfr001}--TRIPLE Space Document, "Lightning Fast!"
  74. *--
  75. * @(3)   {e:\up\rfr002}--Capitalize First Letter of Words in COLUMN Block
  76. * @(4)   {e:\up\rfr002}--Capitalize First Letter of Words in CHARACTER Block
  77. * @(t)   {e:\up\rfr002}--    (Alternate version of @4 for technique only)
  78. * @(8)   {e:\up\rfr002}--    (Alternate version of @4 for technique only)
  79. * @(5)   {e:\up\rfr002}--Capitalize First Letter of Words in LINE Block
  80. * #(f1_) {e:\up\rfr002}--Capitalize Word At Cursor
  81. * #(f4_) {e:\up\rfr002}--Un-Capitalize Word At Cursor
  82. * @(6)   {e:\up\rfr002}--Make All Letters in Block LOWER Case
  83. * @(7)   {e:\up\rfr002}--Make All Letters in Block UPPER Case
  84. *--
  85. * ^(F3__){e:\up\rfr003}--Formats PARAGRAPH (Fast And Small)
  86. * ^(F4__){e:\up\rfr003}--Formats PARAGRAPH (Slow)
  87. * ^(F5__){e:\up\rfr003}--Formats DOCUMENT with Blank Lines Forming PARAGRAPHS
  88. * ^(F6__){e:\up\rfr003}--Formats BLOCK.  Must Position Cursor At BLOCK Begin
  89. * ^(F7__){e:\up\rfr003}--Formats Message Reader Paragraph     (Tim Farley)
  90. * ^(F8__){e:\up\rfr003}--Formats QMAC Txtfile BLOCK with Asterisks in Col 1
  91. *--
  92. * @(F6)  {e:\up\rfr004}--Right Justifies BLOCK (Line Or Character Blocks)
  93. * @(F1)  {e:\up\rfr004}--Right Justifies DOCUMENT
  94. * @(F2)  {e:\up\rfr004}--Right Justifies DOCUMENT, Screen Preview
  95. * @(F4)  {e:\up\rfr004}--Removes Right Justification From LINE Or BLOCK
  96. * @(F5)  {e:\up\rfr004}--Removes Right Justification From DOCUMENT
  97. * #(f7_) {e:\up\rfr004}--Left  Justify Column Block, Right Ragged      (RB)
  98. * #(f8_) {e:\up\rfr004}--Right Justify Column Block, Left  Ragged      (RB)
  99. *                                         (RB) = Richard Blackburn Author
  100. *--
  101. * @(1)   {e:\up\rfr006}--Replace "Period Spc" w/ "Period Two_spaces"-Para
  102. * @(8)   {e:\up\rfr006}--Replace "Period Spc" w/ "Period Two_spaces"
  103. *                           in Whole Paragragh (Variation of @1)
  104. * @(5)   {e:\up\rfr003}--Removes "Period two spaces" from Paragraph       |new
  105. * @(2)   {e:\up\rfr006}--Replace "Period Spc" w/ "Period Two_spaces"-Docu.
  106. * @(3)   {e:\up\rfr006}--Copy Character At Cursor To Line Below
  107. * @(4)   {e:\up\rfr006}--Insert Space At Cursor, Move To Next Line
  108. * @(6)   {e:\up\rfr006}--(Alternate to @4 Independent of Insert Status)
  109. * @(5)   {e:\up\rfr006}--Deletes Char At The Cursor, Move To Next Line
  110. * ^(F9__){e:\up\rfr006}--Make A COMMA Delimited File         (Sammy Mitchell)
  111. * ^(F0__){e:\up\rfr006}-"Break Apart" A COMMA Delimited File (Sammy Mitchell)
  112. * ^(F1__){e:\up\rfr006}--Move Block, Fill Old Block with Blanks
  113. * ^(F2__){e:\up\rfr006}--FillBlock with Blanks
  114. *--
  115. * @(j)   {e:\up\rfr007}--JoinLine with Single Space At Join Point
  116. * ^(Enter){e:\up\rfr007}-Split Line and Align with Last Non-Blank Line
  117. * #(F2_) {e:\up\rfr007}--Split Line and Indent One Tab Stop
  118. * ^(F2__){e:\up\rfr007}--Split Line and Outdent One Tab Stop
  119. * (Tab)  {e:\up\rfr007}--Insert Spaces to Next Tab Stop Regardless of Ins Mode
  120. * #(Tab_){e:\up\rfr007}--Delete Characters to Previous Tab Stop Regardless
  121. *                           of Insert Mode
  122. * ^(F6__){e:\up\rfr007}--Delete to Beginning of Line
  123. * ^(F4__){e:\up\rfr007}--Duplicate Line Up to Cursor Position
  124. *                        (All macros in rfr007.qm were written by
  125. *                         John Goodman except as noted)
  126. *--
  127. * @(1)                 --Dummy Macro
  128. *--
  129. *                                              (JG) - John Goodman, Author
  130. *
  131. * (Index)         - How to locate macro or item below from Index using @f
  132. * (Description)   - Reformat Macros
  133. * (Macros)        - Reformat Macros
  134. * (Other) macros  - not included
  135. * (Test)  paragraph To Reformat
  136. * (Test1) paragraph
  137. * (Test2) paragraph
  138. * (Required) program files
  139. * (Version) history
  140. *
  141. *-- eoi
  142.  
  143.  
  144. * (Description)
  145. * -------------
  146. * (RFRM31).QM are macros to reformat QEDIT blocks, paragraphs, and
  147. * documents.  Asterisks are also added and deleted in front of lines,
  148. * block, and paragraphs.  Number of words and characters in a document
  149. * can also be counted.  Comma delimited files can also be made and
  150. * "broken apart".  Documents can formatted with right justification.
  151. * Blocks can be left and right justified.  Documents can be single,
  152. * double and triple spaced.  Left and right justify column blocks with
  153. * opposite ragged edges.
  154.  
  155. * If column width of the unformatted paragraphs and blocks are greater
  156. * than 80 columns, there must be enough blank lines for ^F4, ^f6 and ^F8
  157. * to paste the reformatted text back and not overlap unformatted areas.
  158. * in other words, BE CAREFUL!
  159. *
  160. * For faster macro execution, replace "C:" with your ram drive.
  161. *
  162. * Insert and AutoIndent should be ON.
  163. *
  164. * (Other) Macros available: See ALLMACRO.INF.
  165. * See MACRxx.QM for other commenting and un-commenting macros.
  166.  
  167. * (Index) Use
  168. * ------------
  169. * To locate a macro or item in this file, press @f, place the cursor
  170. * line on the desired item in the Index above, and press <enter>.
  171. * See BOOKxx.QM for more details.
  172.  
  173. * These macros require "QEdit and QMAC v2.1, February, 1990" or later.
  174.  
  175. * To BEGIN, just type "START RFRM" <Enter>.  All pertinent files will be
  176. * loaded in the "Ring" for viewing, and RFRM31.MAC is read.
  177. * Alternatively, type "START RFRM 0" <Enter> and the disk copies of all
  178. * files in the "Ring" will be loaded ready for editing, saving time.
  179.  
  180. * (Required) Program Files
  181. * -------------------------
  182. * You──MUST──have the exectable program files in AMAC-PRG.ZIP to run
  183. * some of these macros.  AMAC-PRG.ZIP can be found on the following BBS's:
  184. *
  185. *                                 SemWare
  186. *                                 Exec-PC
  187. *
  188. * It can not be found on CompuServe since many of the programs are
  189. * Copyrighted.  All program files are ShareWare, and inclusion in
  190. * AMAC-PRG.ZIP is not prohibited in their documentation.
  191. *
  192. * I thank the authors for these excellent programs.
  193.  
  194. * (Macros)
  195. * --------
  196. * Use @f in BOOKxx.QM to view and read macros in rfr00x.qm.
  197.  
  198. * 
  199. * -------------------
  200. * @(1) Dummy Macro
  201. * -------------------
  202. *
  203. @1 macrobegin begline                   * Dummy to make this a txtfile
  204.  
  205. * (Version) History
  206. * ------------------
  207. *       1.1 - added Alt_6,7 & 8 to format QMAC txtfiles
  208. *       1.1a- modified Alt_8,9 & 10 to get off screen-text in block
  209. *       1.2 - added Alt_5 to format entire document QUICKLY keeping
  210. *                         indented paragraph positions in place
  211. *                   Alt_4 to format entire document keeping indented
  212. *                         paragraph positions in place
  213. *                   Alt_3 to format paragraph only
  214. *           - modified other macros to handle line widths to 512
  215. *       1.2a- modified this documentation
  216. *       1.2b- Added @2 to make single column txtfile from
  217. *             QMAC txtfile, v1.2b
  218. *       1.2c- changed 160 in @9 to 512
  219. *       1.2d- @2 removed, now in COLUMN10.ZIP
  220. *           - @4 removed
  221. *           - added killfile @0
  222. *           - changed macro comments
  223. *       1.3 - added Alt_1 & 2 to put asterisk and space in front
  224. *             of blocks and paragraphs
  225. *       1.4 - added Alt_4 to remove asterisk and space in column 1
  226. *       1.5 - added Alt_t (from Tim Farley) to do the same as Alt_1
  227. *           - changed key assignments
  228. *           - added Alt_2 to remove asterisks in front of blocks
  229. *           - shortened Alt_1 to 32 bytes
  230. *       1.5a- modified Alt_1 to handle blocks with blank lines
  231. *           - changed "60" in ^0 to "69"
  232. *           - Alt_t modified by Tim Farley to correctly handle column
  233. *             and single line blocks.
  234. *       1.5b- corrected documentation
  235. *       1.5c- Changed file name REFORMxx to RFRMxx.
  236. *       1.6 - Added @5.
  237. *           - Changed ^5 and ^9 right margin to 69.
  238. *           - Shortened ^8,9 and 0.
  239. *       1.7 - Added @h to help locate items or macros from Index.
  240. *           - Added @8 to have sentences end with "period space space"
  241. *           - Added ^7 to Formats Message Reader Paragraph (Tim Farley)
  242. *       1.8 - Added @9 and @0 to count number of words in a document.
  243. *           - Added @n to count number of characters in a document.
  244. *           - Added @F3 and @F4 to delete blank lines in documents.
  245. *           - Added ^1/^2 to make/break-apart a comma delimited file.
  246. *             (Written by Sammy Mitchell, SemWare)
  247. *       1.9 - Shortened and removed redundant commands from @0.
  248. *       2.0 - Added @F1 and @F2 to right justify documents.
  249. *           - Added @F4 and @F5 to remove right justification.
  250. *           - Modified documentation and added START.BAT.
  251. *           - Changed REFORM file names to RFRM.
  252. *           - Changed some key assignments.
  253. *       2.1 - Modified documentation (@f4 and @f5).
  254. *       2.2 - Corrected @h Index Use instructions.
  255. *           - Added ^b to change ".  " to ".  " in PARAGRAPHS.
  256. *           - Modified ^c to change ".  " to ".  " in DOCUMENTS.
  257. *       2.3 - Modified @F1 to handle file names with no extension &
  258. *             shortened 7 bytes.
  259. *       2.4 - Added @f6 to right justify line or character blocks.
  260. *           - Added @F3 to capitalize first letter of every word in
  261. *             column block.
  262. *           - Added @F9  to Double Space all text lines in document.
  263. *           - Added @F10 to Triple Space all text lines in document.
  264. *           - Corrected, modified & shortened @F1,@F4 & @f5.
  265. *           - Shortened @F7, @F8, @0, @n & ^c.
  266. *       2.5 - Added ^1 to move block, fill old block with blanks.
  267. *           - Added #f1 to capitalize word
  268. *           - Added #f2 to capitalize first letter of word
  269. *           - Added #f4 to un-capitalize word
  270. *           - Changed @f3 key to #f3.
  271. *           - Made @f6 smoother by adding Zoomwindow.
  272. *           - Corrected size of @f10 in Index.
  273. *       2.6 - Added @1 to comment non-macro portion of macfile
  274. *           - Added @2 to unComment non-macro portion of macfile
  275. *           - Added @4 to Comment whole file
  276. *           - Added @5 to unComment whole file
  277. *           - Added @8 to Comment or unComment line or block.
  278. *           - Added @7 to insert text at start of each line in front of
  279. *             block (Richard Blackburn author)
  280. *           - Added  @j to Join lines with single space at join point
  281. *           - Added #f7 Left Justify Column Block, Right Ragged
  282. *           - Added #f8 Right Justify Column Block, Left Ragged
  283. *           - Following earlier macros are replaced in v2.6 with @8
  284. *             because @8 accomplishes what they each were intended to:
  285. *                @1  Adds asterisk and space in front of BLOCK
  286. *                @2  Deletes asterisk and one space in front of BLOCK
  287. *                @4  Deletes asterisk and one space in column 1
  288. *                @5  Deletes first two characters of line
  289. *                @6  Adds asterisk and one space in column 1
  290. *                @7  Deletes asterisk and ALL space at beginning of line
  291. *                @t  Adds asterisk and space in front of BLOCK
  292. *       2.7 - Changed control_numeric keys to control_function keys.
  293. *                   new        old
  294. *                   ^F1        ^1
  295. *                   ^F3        ^3
  296. *                   ^F4        ^0
  297. *                   ^F5        ^5
  298. *                   ^F6        ^9
  299. *                   ^F7        ^7
  300. *                   ^F8        ^8
  301. *           - Added ^F2 FillBlock blank
  302. *           - Moved @1 to @5 and @8 to COMTxx
  303. *           - Deleted @6
  304. *           - Changed @n key to @2
  305. *           - Corrected and modified @2.
  306. *           - Added @1.
  307. *      2.8  - Corrrected second test paragragh header.
  308. *           - Modified @F8 to make all blanks lines single space in document
  309. *             "Lightning Fast".
  310. *      2.8a - Added @g "Lightning Fast" macro to single space document.
  311. *           - Modified @f9 "Lightning Fast" macro to double space document.
  312. *           - Modified @f0 "Lightning Fast" macro to triple space document.
  313. *           - Shortened @j two bytes.
  314. *           - Modified @9 and @0 to use NUL.
  315. *           - Changed #f3 key to @3.
  316. *           - Changed C:! to NUL, shortened, and added windows to @3.
  317. *           - Added @4 to capitalize first letter of all words
  318. *             in character block.
  319. *           - Added @5 to capitalize first letter of all words
  320. *             in line block.
  321. *           - Added @6/@7 to make all letters in block lower/upper case.
  322. *           - Added latest version of @h.
  323. *           - Shortened and removed window shrink from @3, @4 and @5.
  324. *           - Added @t (alternate version of @4) to capitalize first letter
  325. *             of words in character blocks.
  326. *           - Replaced @h with @f.
  327. *           - Included v2.8a in AMAC39.ZIP.
  328. *       2.9 - Changed documentation, July 23, 1991.
  329. *           - Modified to use subfiles and added latest version of @f,
  330. *             July 23, 1991.
  331. *           - @3 in rfr002.qm was not marking capitalized block correctly.
  332. *             Corrected.
  333. *           - Added @8 to rfr002.qm as an alternate version of @4, using
  334. *             the moveblock concept to the bottom of current file, not NUL.
  335. *             July 24, 1991.
  336. *       2.9a- Removed @f.  Now in BOOKxx.QM.
  337. *           - Changed ^b/c keys in rfr006.qm to @1/2.           July 26, 1991.
  338. *           - Changed @j in rfr006.qm to use splitline/delline, July 26, 1991.
  339. *             Shortened 3 bytes, July 26, 1991.
  340. *           - Added @j version written by John Goodman,         July 27, 1991.
  341. *           - Added all macros in rfr007.qm written by John Goodman,   7/27/91
  342. *           - Added @3, @4 and @5 to rfr006.qm,                        7/28/91
  343. *           - Included v3.9a in AMAC39A.ZIP.                           7/29/91
  344. *       3.0 - Added @7 in rfr006.qm.                                   7/30/91
  345. *           - Corrected @1 rfr006.qm.                                  7/31/91
  346. *           - Added @8 to rfr006.qm.                                   7/31/91
  347. *                   (ver 3.0 in AMACxx.ZIP, v4.0)
  348. *       3.1 - Added @1 and @2 to rfr003.qm.                             8/5/91
  349. *           - Corrected @7 in rfr006.qm to be independent of Insert     8/6/91
  350. *             mode.
  351. *           - Added @9/@0 to sort column blocks case-insensitive/       8/7/91
  352. *             reverse sort, to rfr006.qm.
  353. *           - Moved @7 from rfr006.qm to rfr008.qm as @1                8/7/91
  354. *             and added @2 to rfr008.qm, both to swap characters.
  355. *           - Added @3, @4 and @5 to rfr003.qm.                         8/8/91
  356. *           - Modified #f1 in rfr002.qm to handle capitalized words.    8/8/91
  357. *           - Added John Goodman modified ver 2 of @1 in rfr008.qm.     8/8/91
  358. *           - Shortened @2 in rfr008.qm one byte.                       8/8/91
  359. *           - Added @3/4/5/6 in rfr008.qm to convert a vertical        8/11/91
  360. *             column block to a horizontal column block, & vice versa.
  361. *           - Added @7 in rfr008.qm.                                   8/12/91
  362. *           - Modified @0 in rfr006.qm for correct file ring pos.      8/13/91
  363. *           - Added rfr009 and rfr010.                                 8/13/91
  364. *           - Moved @9 and @0 from rfr006.qm to rfr009.qm.             8/13/91
  365. *           - Moved @3-6 and @8 from rfr008 to rfr009.qm.              8/13/91
  366. *           - Changed @0 key to @7 in rfr009.qm.                       8/13/91
  367. *           - Added @5 and @6 to swap words at cursor in rfr008.qm.    8/13/91
  368. *           - Modified @3-7 in rfr009.qm.                              8/15/91
  369. *           - Added @9 and @0 in rfr008.qm to swap lines.              8/15/91
  370. *           - Added @e in rfr008.qm.                                   8/20/91
  371. *           - Added @x and @y in rfr008.qm from John Goodman.          8/21/91
  372. *           - Added @3 and @4 by John Goodman to rfr005.qm.            8/23/91
  373. *           - Modified @0 in rfr005.qm.                                8/23/91
  374. *           - Removed @9 from rfr005.qm.                               8/23/91
  375. *
  376. *
  377. *
  378. *
  379. *
  380. *
  381. *
  382.